{% extends "base.html" %}
{% block title %}{{ lang.menu_links.versions.h2 }} {{ lang.words[service] }}{% endblock %}
{% block h2 %}{{ lang.menu_links.versions.h2 }} {{ lang.words[service] }}{% endblock %}
{% block content %}
	<p>
		<form action="/app/config/versions/{{service}}/{{serv}}" method="post" class="left-space">
			<input type="hidden" id="service" value="{{service}}">
			{{ select('serv', values=g.user_params['servers'], is_servers='true', selected=serv) }}
			<button type="submit" value="open" name="open" class="btn btn-default">{{lang.words.open|title()}}</button>
		</form>
	</p>
	{% if not aftersave %}
		{% if stderr %}
			{% include 'include/errors.html' %}
		{% endif %}
		<div id="config_version_div"></div>
		<script>showListOfVersion(0)</script>
	{% endif %}
	{% if aftersave %}
		<div class="alert alert-info alert-two-row">{{lang.phrases.version_has_been_uploaded}}: {{ configver }} </div>
		{% if 'is valid' not in stderr %}
			{% include 'include/errors.html' %}	
		{% else %}
			<div class="alert alert-success">{{lang.words.config|title()}} {{lang.words.is}} {{lang.words.valid}}</div>
		{% endif %}
	{% endif %}
{% endblock %}
